Cloud Commerce Partner Procurement API . providers . accounts

Instance Methods

approve(name, body=None, x__xgafv=None)

Grants an approval on an Account.

close()

Close httplib2 connections.

get(name, x__xgafv=None)

Gets a requested Account resource.

list(parent, pageSize=None, pageToken=None, x__xgafv=None)

Lists Accounts that the provider has access to.

list_next(previous_request, previous_response)

Retrieves the next page of results.

reject(name, body=None, x__xgafv=None)

Rejects an approval on an Account.

reset(name, body=None, x__xgafv=None)

Resets an Account and cancel all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.

Method Details

approve(name, body=None, x__xgafv=None)
Grants an approval on an Account.

Args:
  name: string, The resource name of the account. Required. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for PartnerProcurementService.ApproveAccount.
  "approvalName": "A String", # The name of the approval being approved. If absent and there is only one approval possible, that approval will be granted. If absent and there are many approvals possible, the request will fail with a 400 Bad Request. Optional.
  "properties": { # Set of properties that should be associated with the account. Optional.
    "a_key": "A String",
  },
  "reason": "A String", # Free form text string explaining the approval reason. Optional. Max allowed length: 256 bytes. Longer strings will be truncated.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}
close()
Close httplib2 connections.
get(name, x__xgafv=None)
Gets a requested Account resource.

Args:
  name: string, The name of the account to retrieve. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents an account that was established by the customer on the service provider's system.
  "approvals": [ # Output only. The approvals for this account. These approvals are used to track actions that are permitted or have been completed by a customer within the context of the provider. This might include a sign up flow or a provisioning step, for example, that the provider can admit to having happened.
    { # An approval for some action on an account.
      "name": "A String", # Output only. The name of the approval.
      "reason": "A String", # Output only. An explanation for the state of the approval.
      "state": "A String", # Output only. The state of the approval.
      "updateTime": "A String", # Optional. The last update timestamp of the approval.
    },
  ],
  "createTime": "A String", # Output only. The creation timestamp.
  "inputProperties": { # Output only. The custom properties that were collected from the user to create this account.
    "a_key": "", # Properties of the object.
  },
  "name": "A String", # Output only. The resource name of the account. Account names have the form `accounts/{account_id}`.
  "provider": "A String", # Output only. The identifier of the service provider that this account was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform.
  "state": "A String", # Output only. The state of the account. This is used to decide whether the customer is in good standing with the provider and is able to make purchases. An account might not be able to make a purchase if the billing account is suspended, for example.
  "updateTime": "A String", # Output only. The last update timestamp.
}
list(parent, pageSize=None, pageToken=None, x__xgafv=None)
Lists Accounts that the provider has access to.

Args:
  parent: string, The parent resource name. (required)
  pageSize: integer, The maximum number of entries that are requested. Default size is 200.
  pageToken: string, The token for fetching the next page.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for [PartnerProcurementService.ListAccounts[].
  "accounts": [ # The list of accounts in this response.
    { # Represents an account that was established by the customer on the service provider's system.
      "approvals": [ # Output only. The approvals for this account. These approvals are used to track actions that are permitted or have been completed by a customer within the context of the provider. This might include a sign up flow or a provisioning step, for example, that the provider can admit to having happened.
        { # An approval for some action on an account.
          "name": "A String", # Output only. The name of the approval.
          "reason": "A String", # Output only. An explanation for the state of the approval.
          "state": "A String", # Output only. The state of the approval.
          "updateTime": "A String", # Optional. The last update timestamp of the approval.
        },
      ],
      "createTime": "A String", # Output only. The creation timestamp.
      "inputProperties": { # Output only. The custom properties that were collected from the user to create this account.
        "a_key": "", # Properties of the object.
      },
      "name": "A String", # Output only. The resource name of the account. Account names have the form `accounts/{account_id}`.
      "provider": "A String", # Output only. The identifier of the service provider that this account was created against. Each service provider is assigned a unique provider value when they onboard with Cloud Commerce platform.
      "state": "A String", # Output only. The state of the account. This is used to decide whether the customer is in good standing with the provider and is able to make purchases. An account might not be able to make a purchase if the billing account is suspended, for example.
      "updateTime": "A String", # Output only. The last update timestamp.
    },
  ],
  "nextPageToken": "A String", # The token for fetching the next page.
}
list_next(previous_request, previous_response)
Retrieves the next page of results.

Args:
  previous_request: The request for the previous page. (required)
  previous_response: The response from the request for the previous page. (required)

Returns:
  A request object that you can call 'execute()' on to request the next
  page. Returns None if there are no more items in the collection.
    
reject(name, body=None, x__xgafv=None)
Rejects an approval on an Account.

Args:
  name: string, The resource name of the account. Required. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for PartnerProcurementService.RejectAccount.
  "approvalName": "A String", # The name of the approval being rejected. If absent and there is only one approval possible, that approval will be rejected. If absent and there are many approvals possible, the request will fail with a 400 Bad Request. Optional.
  "reason": "A String", # Free form text string explaining the rejection reason. Max allowed length: 256 bytes. Longer strings will be truncated.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}
reset(name, body=None, x__xgafv=None)
Resets an Account and cancel all associated Entitlements. Partner can only reset accounts they own rather than customer accounts.

Args:
  name: string, The resource name of the account. Required. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for for PartnerProcurementService.ResetAccount.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}