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 |
SuccessFragment inventory_links_contract(linkid, createcontractrequest=createcontractrequest)
Create new Contract on specified link
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)
Name | Type | Description | Notes |
---|---|---|---|
linkid | str | Unique identifier representing a specific link | |
createcontractrequest | Createcontractrequest | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse2006 inventory_links_contract_get(linkid, contractid)
Get active Contract by ContractID
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)
Name | Type | Description | Notes |
---|---|---|---|
linkid | str | Unique identifier representing a specific link | |
contractid | str | Unique identifier representing a specific contract |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SuccessFragment inventory_links_contract_put(linkid, contractid, body=body)
Update active Contract by ContractID
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)
Name | Type | Description | Notes |
---|---|---|---|
linkid | str | Unique identifier representing a specific link | |
contractid | str | Unique identifier representing a specific contract | |
body | Body | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]