Skip to content

Latest commit

 

History

History
316 lines (222 loc) · 17.9 KB

File metadata and controls

316 lines (222 loc) · 17.9 KB

zuora_client.EntitiesApi

All URIs are relative to https://rest.zuora.com

Method HTTP request Description
d_elete_entities DELETE /v1/entities/{id} Multi-entity: Delete entity
g_et_entities GET /v1/entities Multi-entity: Get entities
g_et_entity_by_id GET /v1/entities/{id} Multi-entity: Get entity by Id
p_ost_entities POST /v1/entities Multi-entity: Create entity
p_ut_entities PUT /v1/entities/{id} Multi-entity: Update entity
p_ut_provision_entity PUT /v1/entities/{id}/provision Multi-entity: Provision entity

d_elete_entities

DELETEntityResponseType d_elete_entities(id, zuora_entity_ids=zuora_entity_ids)

Multi-entity: Delete entity

Note: The Multi-entity feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. Removes an entity and its sub-entities from a multi-entity hierarchy. You can only remove unprovisioned entities. An error occurred when you remove a provisioned entity. ## User Access Permission You must make the call as a global entity administrator.

Example

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

# create an instance of the API class
api_instance = zuora_client.EntitiesApi()
id = 'id_example' # str | Specify the Id of the entity that you want to delete. You can get the entity Id from the GET Entities call.
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Multi-entity: Delete entity
    api_response = api_instance.d_elete_entities(id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntitiesApi->d_elete_entities: %s\n" % e)

Parameters

Name Type Description Notes
id str Specify the Id of the entity that you want to delete. You can get the entity Id from the GET Entities call.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

DELETEntityResponseType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

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

g_et_entities

GETEntitiesResponseType g_et_entities(zuora_entity_ids=zuora_entity_ids, provisioned=provisioned)

Multi-entity: Get entities

Note: The Multi-entity feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves detailed information of certain entities in a multi-entity hierarchy. You can retrieve: - Provisioned entities - Unprovisioned entities - Both provisioned and unprovisioned entities ## User Access Permission You can make the call as any entity user.

Example

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

# create an instance of the API class
api_instance = zuora_client.EntitiesApi()
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)
provisioned = 'provisioned_example' # str | Specify whether to retrieve provisioned or unprovisioned entities:  - `true`: Provisioned entities  - `false`: Unprovisioned entities   If you do not specify this field in the request, both the provisioned and unprovisioned entities are returned.  (optional)

try:
    # Multi-entity: Get entities
    api_response = api_instance.g_et_entities(zuora_entity_ids=zuora_entity_ids, provisioned=provisioned)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntitiesApi->g_et_entities: %s\n" % e)

Parameters

Name Type Description Notes
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]
provisioned str Specify whether to retrieve provisioned or unprovisioned entities: - `true`: Provisioned entities - `false`: Unprovisioned entities If you do not specify this field in the request, both the provisioned and unprovisioned entities are returned. [optional]

Return type

GETEntitiesResponseType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

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

g_et_entity_by_id

GETEntitiesResponseTypeWithId g_et_entity_by_id(id, zuora_entity_ids=zuora_entity_ids)

Multi-entity: Get entity by Id

Note: The Multi-entity feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. Retrieves detailed information about a specified entity. ## User Access Permission You can make the call as any entity user.

Example

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

# create an instance of the API class
api_instance = zuora_client.EntitiesApi()
id = 'id_example' # str | Specify the Id of the entity that you want to retrieve. You can get the entity Id from the GET Entities call.
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Multi-entity: Get entity by Id
    api_response = api_instance.g_et_entity_by_id(id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntitiesApi->g_et_entity_by_id: %s\n" % e)

Parameters

Name Type Description Notes
id str Specify the Id of the entity that you want to retrieve. You can get the entity Id from the GET Entities call.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

GETEntitiesResponseTypeWithId

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

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

p_ost_entities

CreateEntityResponseType p_ost_entities(request, zuora_entity_ids=zuora_entity_ids)

Multi-entity: Create entity

Note: The Multi-entity feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. Creates an entity in a multi-entity hierarchy. ## User Access Permission You must make the call as a global entity administrator. ## Notes * We recommend that you assign only one administrator to manage the entity hierarchy, because an administrator of the global entity by default can only access to the entities that are created by themselves.

Example

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

# create an instance of the API class
api_instance = zuora_client.EntitiesApi()
request = zuora_client.CreateEntityType() # CreateEntityType | 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Multi-entity: Create entity
    api_response = api_instance.p_ost_entities(request, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntitiesApi->p_ost_entities: %s\n" % e)

Parameters

Name Type Description Notes
request CreateEntityType
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

CreateEntityResponseType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

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

p_ut_entities

UpdateEntityResponseType p_ut_entities(id, request, zuora_entity_ids=zuora_entity_ids)

Multi-entity: Update entity

Note: The Multi-entity feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. Edits the following information about an unprovisioned entity: - Name - Display name - Locale - Timezone ## User Access Permission You must make the call as a global entity administrator. ## Notes * You are not allowed to edit the locale and time zone of the provisioned entities through the REST API. * You are not allowed to edit the display name of the global entity.

Example

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

# create an instance of the API class
api_instance = zuora_client.EntitiesApi()
id = 'id_example' # str | The Id of the entity that you want to edit. You can get the entity Id from the GET Entities call.
request = zuora_client.UpdateEntityType() # UpdateEntityType | 
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Multi-entity: Update entity
    api_response = api_instance.p_ut_entities(id, request, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntitiesApi->p_ut_entities: %s\n" % e)

Parameters

Name Type Description Notes
id str The Id of the entity that you want to edit. You can get the entity Id from the GET Entities call.
request UpdateEntityType
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

UpdateEntityResponseType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

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

p_ut_provision_entity

ProvisionEntityResponseType p_ut_provision_entity(id, zuora_entity_ids=zuora_entity_ids)

Multi-entity: Provision entity

Note: The Multi-entity feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support. Provisions an entity. You can only provision an entity if its parent entity is provisioned. ## User Access Permission You must make the call as a global entity administrator. ## Notes * Zuora does not allow you to remove a provisioned entity from the multi-entity hierarchy. So before you provision an entity, make sure that you put the entity in the correct place in the multi-entity hierarchy.

Example

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

# create an instance of the API class
api_instance = zuora_client.EntitiesApi()
id = 'id_example' # str | Specify the Id of the entity that you want to provision.  You can get the entity Id from the GET Entities call.
zuora_entity_ids = 'zuora_entity_ids_example' # str | An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header.  (optional)

try:
    # Multi-entity: Provision entity
    api_response = api_instance.p_ut_provision_entity(id, zuora_entity_ids=zuora_entity_ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling EntitiesApi->p_ut_provision_entity: %s\n" % e)

Parameters

Name Type Description Notes
id str Specify the Id of the entity that you want to provision. You can get the entity Id from the GET Entities call.
zuora_entity_ids str An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you do not need to set this header. [optional]

Return type

ProvisionEntityResponseType

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: application/json; charset=utf-8

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