Skip to content

Latest commit

 

History

History
169 lines (120 loc) · 5.76 KB

ContractsApi.md

File metadata and controls

169 lines (120 loc) · 5.76 KB

TelstraTPN.ContractsApi

All URIs are relative to https://penapi.pacnetconnect.com

Method HTTP request Description
inventory_links_contract POST /1.0.0/inventory/links/{linkid}/contract Create new Contract on specified link
inventory_links_contract_get GET /1.0.0/inventory/links/{linkid}/contract/{contractid} Get active Contract by ContractID
inventory_links_contract_put PUT /1.0.0/inventory/links/{linkid}/contract/{contractid} Update active Contract by ContractID

inventory_links_contract

SuccessFragment inventory_links_contract(linkid, createcontractrequest=createcontractrequest)

Create new Contract on specified link

Example

from __future__ import print_function
import time
import TelstraTPN
from TelstraTPN.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oAuth2
configuration = TelstraTPN.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = TelstraTPN.ContractsApi(TelstraTPN.ApiClient(configuration))
linkid = 'linkid_example' # str | Unique identifier representing a specific link
createcontractrequest = TelstraTPN.Createcontractrequest() # Createcontractrequest |  (optional)

try:
    # Create new Contract on specified link
    api_response = api_instance.inventory_links_contract(linkid, createcontractrequest=createcontractrequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ContractsApi->inventory_links_contract: %s\n" % e)

Parameters

Name Type Description Notes
linkid str Unique identifier representing a specific link
createcontractrequest Createcontractrequest [optional]

Return type

SuccessFragment

Authorization

oAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

inventory_links_contract_get

InlineResponse2006 inventory_links_contract_get(linkid, contractid)

Get active Contract by ContractID

Example

from __future__ import print_function
import time
import TelstraTPN
from TelstraTPN.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oAuth2
configuration = TelstraTPN.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = TelstraTPN.ContractsApi(TelstraTPN.ApiClient(configuration))
linkid = 'linkid_example' # str | Unique identifier representing a specific link
contractid = 'contractid_example' # str | Unique identifier representing a specific contract

try:
    # Get active Contract by ContractID
    api_response = api_instance.inventory_links_contract_get(linkid, contractid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ContractsApi->inventory_links_contract_get: %s\n" % e)

Parameters

Name Type Description Notes
linkid str Unique identifier representing a specific link
contractid str Unique identifier representing a specific contract

Return type

InlineResponse2006

Authorization

oAuth2

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

inventory_links_contract_put

SuccessFragment inventory_links_contract_put(linkid, contractid, body=body)

Update active Contract by ContractID

Example

from __future__ import print_function
import time
import TelstraTPN
from TelstraTPN.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oAuth2
configuration = TelstraTPN.Configuration()
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = TelstraTPN.ContractsApi(TelstraTPN.ApiClient(configuration))
linkid = 'linkid_example' # str | Unique identifier representing a specific link
contractid = 'contractid_example' # str | Unique identifier representing a specific contract
body = TelstraTPN.Body() # Body |  (optional)

try:
    # Update active Contract by ContractID
    api_response = api_instance.inventory_links_contract_put(linkid, contractid, body=body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ContractsApi->inventory_links_contract_put: %s\n" % e)

Parameters

Name Type Description Notes
linkid str Unique identifier representing a specific link
contractid str Unique identifier representing a specific contract
body Body [optional]

Return type

SuccessFragment

Authorization

oAuth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]