Billing API, gRPC: CustomerService
A set of methods for managing Customer resources.
Call | Description |
---|---|
List | Retrieves the list of customers associated with the specified reseller. |
Invite | Invites customer to the specified reseller. |
CreateResellerServed | Creates new reseller-served customer. |
Activate | Activates specified customer. |
Suspend | Suspend specified customer. |
Calls CustomerService
List
Retrieves the list of customers associated with the specified reseller.
rpc List (ListCustomersRequest) returns (ListCustomersResponse)
ListCustomersRequest
Field | Description |
---|---|
reseller_id | string Required. ID of the reseller. The maximum string length in characters is 50. |
page_size | int64 The maximum number of results per page to return. If the number of available results is larger than page_size , the service returns a ListCustomersResponse.next_page_token that can be used to get the next page of results in subsequent list requests. The maximum value is 1000. |
page_token | string Page token. To get the next page of results, set page_token to the ListCustomersResponse.next_page_token returned by a previous list request. The maximum string length in characters is 100. |
ListCustomersResponse
Field | Description |
---|---|
customers[] | Customer List of customers. |
next_page_token | string This token allows you to get the next page of results for list requests. If the number of results is larger than ListCustomersRequest.page_size, use next_page_token as the value for the ListCustomersRequest.page_token query parameter in the next list request. Each subsequent list request will have its own next_page_token to continue paging through the results. |
Customer
Field | Description |
---|---|
id | string ID of the customer. |
billing_account_id | string ID of the yandex.cloud.billing.v1.BillingAccount assigned to the customer. |
Invite
Invites customer to the specified reseller.
rpc Invite (InviteCustomerRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CustomerMetadata
Operation.response:Customer
InviteCustomerRequest
Field | Description |
---|---|
reseller_id | string Required. Billing account ID of the reseller that the customer will be associated with. The maximum string length in characters is 50. |
name | string Required. Name of the customer. |
invitation_email | string Required. Customer email to send invitation to. |
person | CustomerPerson Required. Person of the customer. |
CustomerPerson
Field | Description |
---|---|
name | string Optional. Name of the person. String length is not limited. |
longname | string Optional. Long name of the person. String length is not limited. |
phone | string Optional. Phone of the person. Must be a valid telephone number or a valid phoneword |
string Optional. Email of the person. Must be a valid email address |
|
post_code | string Optional. Post code of the person. String length is not limited. |
post_address | string Optional. Post address of the person. String length is not limited. |
legal_address | string Optional. Legal address of the person. String length is not limited. |
tin | string Optional. Tax identification number of the person. String length is not limited. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CustomerMetadata
Field | Description |
---|---|
reseller_id | string ID of the reseller. |
customer_id | string ID of the customer. |
Customer
Field | Description |
---|---|
id | string ID of the customer. |
billing_account_id | string ID of the yandex.cloud.billing.v1.BillingAccount assigned to the customer. |
CreateResellerServed
Creates new reseller-served customer.
rpc CreateResellerServed (CreateResellerServedCustomerRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CustomerMetadata
Operation.response:Customer
CreateResellerServedCustomerRequest
Field | Description |
---|---|
reseller_id | string Required. ID of the reseller that customer will be associated with. Value must match either one of the two regular expressions: `^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f] |
name | string Required. Name of the customer. String length is not limited. |
person | CustomerPerson Required. Person of the customer. |
CustomerPerson
Field | Description |
---|---|
name | string Optional. Name of the person. String length is not limited. |
longname | string Optional. Long name of the person. String length is not limited. |
phone | string Optional. Phone of the person. Must be a valid telephone number or a valid phoneword |
string Optional. Email of the person. Must be a valid email address |
|
post_code | string Optional. Post code of the person. String length is not limited. |
post_address | string Optional. Post address of the person. String length is not limited. |
legal_address | string Optional. Legal address of the person. String length is not limited. |
tin | string Optional. Tax identification number of the person. String length is not limited. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CustomerMetadata
Field | Description |
---|---|
reseller_id | string ID of the reseller. |
customer_id | string ID of the customer. |
Customer
Field | Description |
---|---|
id | string ID of the customer. |
billing_account_id | string ID of the yandex.cloud.billing.v1.BillingAccount assigned to the customer. |
Activate
Activates specified customer. After customer is activated, he can use resources associated with his billing account.
rpc Activate (ActivateCustomerRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CustomerMetadata
Operation.response:Customer
ActivateCustomerRequest
Field | Description |
---|---|
customer_id | string Required. ID of the customer. To get the customer ID, use CustomerService.List request. The maximum string length in characters is 50. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CustomerMetadata
Field | Description |
---|---|
reseller_id | string ID of the reseller. |
customer_id | string ID of the customer. |
Customer
Field | Description |
---|---|
id | string ID of the customer. |
billing_account_id | string ID of the yandex.cloud.billing.v1.BillingAccount assigned to the customer. |
Suspend
Suspend specified customer. After customer is suspended, he can't use resources associated with his billing account.
rpc Suspend (SuspendCustomerRequest) returns (operation.Operation)
Metadata and response of Operation:
Operation.metadata:CustomerMetadata
Operation.response:Customer
SuspendCustomerRequest
Field | Description |
---|---|
customer_id | string Required. ID of the customer. To get the customer ID, use CustomerService.List request. The maximum string length in characters is 50. |
Operation
Field | Description |
---|---|
id | string ID of the operation. |
description | string Description of the operation. 0-256 characters long. |
created_at | google.protobuf.Timestamp Creation timestamp. |
created_by | string ID of the user or service account who initiated the operation. |
modified_at | google.protobuf.Timestamp The time when the Operation resource was last modified. |
done | bool If the value is false , it means the operation is still in progress. If true , the operation is completed, and either error or response is available. |
metadata | google.protobuf.Any Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any. |
result | oneof: error or response The operation result. If done == false and there was no failure detected, neither error nor response is set. If done == false and there was a failure detected, error is set. If done == true , exactly one of error or response is set. |
error | google.rpc.Status The error result of the operation in case of failure or cancellation. |
response | google.protobuf.Any if operation finished successfully. |
CustomerMetadata
Field | Description |
---|---|
reseller_id | string ID of the reseller. |
customer_id | string ID of the customer. |
Customer
Field | Description |
---|---|
id | string ID of the customer. |
billing_account_id | string ID of the yandex.cloud.billing.v1.BillingAccount assigned to the customer. |